{% extends "EnsaoAppBundle::layout.html.twig" %}

{% block titre %}
    صفحة الملفات
{% endblock %}

{% block css %}
    {{ parent() }}

{% endblock %}

{% block js %}
    {{ parent() }}
    <script type="text/javascript">
        $(document).ready(function () {
           /* $("#add_operation").click(function (event) {
                // initialisation objet form
                var $form = $("#form_paie");
                //récupération les valeurs sérialisé de formulaire
                var values = $form.serialize();
                var url    = $form.attr("action");
                $.ajax({
                    type: "POST",
                    url: url,
                    data: values,
                    error:function(){alert('Erreur !!')},
                    success: function( retour ) {
                        //$('#addPaie').html(retour);
                        //  $(".loading").hide();
                    }
                });
                return false;
            }); */
        });
    </script>
    <script type="text/javascript">

        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-29497072-1']);
        _gaq.push(['_trackPageview']);

        (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();

    </script>
    <script type="text/javascript">
        $(function() {
            $( "#tabs" ).tabs();
        });
    </script>

    <script type="text/javascript">
        $(function() {
            //la validation
            $("#form_proced1").validationEngine('attach', {scroll: false, promptPosition :"topLeft:-59" , prettySelect : true});
            $("#form_proced2").validationEngine('attach', {scroll: false, promptPosition :"topLeft:-59" , prettySelect : true });
            $("#form_paie").validationEngine('attach', {scroll: false, promptPosition :"topLeft:-59" , prettySelect : true });
        });
    </script>
    <script type="text/javascript">

        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-29497072-1']);
        _gaq.push(['_trackPageview']);

        (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();

    </script>
{% endblock %}

{% block menu %}
    {{ parent() }}
{% endblock %}

{% block topcomumn %}
    {{ parent() }}
{% endblock %}

{% block titrepage %}
    <span><img src="{{ asset('images/icon/color_18/folder.png') }}" id="icoDos"/></span><span id="titreDos">الملفات</span>

{% endblock %}

{% block content %}
{% if app.session.hasFlash('notice') %}
    <div class="success alertMessage SE" >
        <strong>{{ app.session.flash('notice') }} </strong>
    </div>
{% endif %}
{% if app.session.hasFlash('notice2') %}
    <div class="error alertMessage SE" id="notice">
        <strong>{{ app.session.flash('notice') }} </strong>
    </div>
{% endif %}
<div id="UITab">
<div class="tab_container">

<div id ="tab1" class="tab_content">
<div class="load_page">
    <div class="widget   haut">
        <div class="content">

            <div class="widgets">
                <div class="oneTwo" id="one">
                    <div class="widget" id="widg">
                        <div class="right">
                            <table align="">
                                <tr>
                                    <td></td>
                                    <td ><label>المرجع    : </label> </td>
                                    <td>{{ dossier.id }}</td><td>&nbsp;</td>
                                    <td>&nbsp;</td><td>&nbsp;</td>
                                </tr>
                                <tr>
                                <tr>
                                    <td><label></label></td>
                                    <td ><label>  نوع  القضية : </label> </td>
                                    <td>{{ ssCateg.libelle }}</td><td>&nbsp;</td>
                                    <td>&nbsp;</td><td>&nbsp;</td>
                                </tr>
                                <td>&nbsp;</td>
                                <td >&nbsp; </td>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td><label>تاريخ فتح الملف:</label></td>
                                    <td>{{ dossier.dateCreation|date("Y-m-d") }}</td><td>&nbsp;</td>
                                    <td>&nbsp;</td><td>&nbsp;</td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td><label>تاريخ حفظ الملف:</label></td>
                                    <td>&nbsp;</td><td>&nbsp;</td>
                                    <td>&nbsp;</td><td>&nbsp;</td>
                                </tr>
                                <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
                                <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
                                <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
                                <tr>



                                    <td></td>
                                    <td><label>لفائدة:</label></td>
                                    <td>{% for client in listClient%}
                                        {{ client.nom}}&nbsp;{% endfor %}</td><td>&nbsp;</td>
                                    <td>&nbsp;</td><td>&nbsp;</td>
                                </tr>
                                <tr>

                                    <td></td>
                                    <td><label>ضد:</label></td>
                                    <td>{% for Adversaire in listAdversaire%}
                                        {{ Adversaire.nom}}&nbsp;{% endfor %}</td><td>&nbsp;</td>
                                    <td>&nbsp;</td><td>&nbsp;</td>

                                </tr>
                            </table>
                        </div>
                    </div>
                </div>

                <div class="oneTwo"  id="one">
                    <div class="widget" id="widg">
                        <div class="">
                            <table align="right">
                                <tr>
                                    <td></td>
                                    <td><label>قضية ابتدائية عدد :</label>{{ dossier.numDossier }}</td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td><label> القاضي المقرر : </label></td>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td> <label> قضية استئنافية عدد : </label>{{ dossier.numDossier2 }}</td>
                                </tr>
                                <tr>
                                    <td></td>
                                    <td> <label> المستشار المقرر : </label></td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>


    <ul class="BtmodienteteProc">
        <li><button class="uibutton icon edit " id="correction" >تصحيح</button></li>
    </ul>

</div>


<!-- Half width column-->
<div class="widgets">

    <div class="oneTwo" id="largeur">

        <div class="demo">

            <div id="tabs">
                <ul>
                    <li><a href="#tabs-1"><span><img src="{{ asset('images/icon/dossIcon/tribunal.png') }}" id="icoFact" style="width:18px;height:18px;"/></span><span id="titreFact">المرحلة الإبتدائية</span></a></li>
                    <li><a href="#tabs-2"><span><img src="{{ asset('images/icon/dossIcon/tribunal.png') }}" id="icoFact" style="width:18px;height:18px;"/></span><span id="titreFact">المرحلة الإستئنافية</span></a></li>
                    <li id="liTab"><a href="#tabs-3"><span><img src="{{ asset('images/icon/dossIcon/facture.png') }}" id="icoFact" style="width:18px;height:18px;"/></span><span id="titreFact">الفاتورة</span></a></li>
                </ul>
                <div id="tabs-1">

                    <div class="tableName inTab" id="posTab">
                        <h3 id="h3Affich">المرحلة الإبتدائية</h3>
                        <table class="display data_table3  " id="data_table3"  >
                            <thead>
                            <tr>
                                <th width="174">التاريخ</th>
                                <th></th>
                                <th></th>
                                <th width="700" >الإجراءات</th>
                                <th width="180"></th>
                                <th width="0"></th>
                            </tr>
                            </thead>
                            <tbody>
                            {%for procedd in listProceds    if procedd.instance.libelle =='إبتدائية'%}

                                <tr>
                                    <td> {{procedd.dateCreation|date("Y-m-d")}}</td>
                                    <td width="0"></td>
                                    <td width="0"></td>
                                    <td >{{ procedd.description }}  </td>
                                    <td>
                                        <span class="tip load_page">
										    <a  href="#modifProced" class="dosPaie_pop_box add login-window" title="تصحيح" >
                                                <img src=" {{ asset('images/icon/icon_edit.png ')}}" />
                                            </a>
										</span>

                                        {% include "EnsaoAppBundle:Dossier:modifProced.html.twig" with {'formModifPaie': formModifPaie} %}

                                        <span class="tip load_page">
										    <a href="#deleteProced" class="delete_pop_box  login-window" title="حذف">
                                                <img src=" {{ asset('images/icon/icon_delete.png ')}}" />
                                            </a>
										</span>

                                        {% include "EnsaoAppBundle:Dossier:deleteProced.html.twig" %}

                                    </td>
                                    <td width="0"></td>
                                </tr>

                            {% endfor %}
                            </tbody>
                        </table>
                    </div>

                    <ul class="BtajoutPrec" >
                        <li><a href="#addProced1" class=" dos_pop_box uibutton icon add" id="ajouProc1"/>إضافة إجراء</a></li>
                    </ul>
                    <!--ici-->
                    {% include "EnsaoAppBundle:Dossier:formProced1.html.twig" with {'formProced1': formProced1} %}

                </div>


                <div id="tabs-2">

                    <div class="tableName inTab" id="posTab">

                        <h3 id="h3Affich">المرحلة الإستئنافية</h3>
                        <table class="display data_table3  " id="data_table3"  >
                            <thead>
                            <tr>
                                <th width="174">التاريخ</th>
                                <th></th>
                                <th></th>
                                <th width="700" >الإجراءات</th>
                                <th width="180"></th>
                                <th width="0"></th>
                            </tr>
                            </thead>
                            <tbody>
                            {%for procedd in listProceds if procedd.instance.libelle =='إستئنافية'%}

                                <tr>
                                    <td> {{procedd.dateCreation|date("Y-m-d")}}</td>
                                    <td width="0"></td>
                                    <td width="0"></td>
                                    <td >{{ procedd.description }}  </td>
                                    <td>
									    <span class="tip">
										    <a href="#addProc1" class="login-window" title="تصحيح">
                                                <img src=" {{ asset('images/icon/icon_edit.png ')}}" />
                                            </a>
										</span>

                                        <span class="tip load_page">
										    <a href="#deleteProced" class="delete_pop_box  login-window" title="حذف">
                                                <img src=" {{ asset('images/icon/icon_delete.png ')}}" />
                                            </a>
										</span>
                                        {% include "EnsaoAppBundle:Dossier:deleteProced.html.twig"%}

                                    </td>
                                    <td width="0"></td>
                                </tr>

                            {% endfor %}
                            </tbody>

                        </table>

                    </div>

                    <ul class="BtajoutPrec" >
                        <li><a href="#addProced2" class=" dos2_pop_box uibutton icon add" id="ajouProc2"/>إضافة إجراء</a></li>
                    </ul>
                    <!--ici-->
                    {% include "EnsaoAppBundle:Dossier:formProced2.html.twig" with {'formProced2': formProced2} %}


                </div>

                <div id="tabs-3">

                    <div class="tableName inTab">
                        <h3 id="h3Affich">الفاتورة</h3>
                        <!--<table class="honoraire"><tr><td> <h2> قدرت الأتعاب بما قيمته  :</h2></td><td></td></tr></table>-->

                        <table class="display data_table3" id="tabFact"  >
                            <thead>
                            <tr>
                                <th width="174">تاريخ العملية</th>
                                <th width="174">المبلغ</th>
                                <th width="700"> ملاحظات</th>
                                <th  width="0"></th>
                                <th  width="0"></th>
                                <th width="180"></th>
                            </tr>
                            </thead>
                            <tbody>
                            {%for paiment in listPaiements%}


                                <tr>

                                    <td>{{paiment.dateOperation|date("Y-m-d")}}</td>
                                    <td>{{paiment.montant}} </td>
                                    <td>{{paiment.observation}}</td>
                                    <td></td>
                                    <td></td>
                                    <td>
										<span class="tip load_page"><!--modifPaie -->
										    <a  href="#modifPaie" class="dosPaie_pop_box add login-window" title="تصحيح" >
                                                <img src=" {{ asset('images/icon/icon_edit.png ')}}" />
                                            </a>
										</span>
                                        {% include "EnsaoAppBundle:Dossier:modifPaie.html.twig" with {'formModifPaie': formModifPaie} %}


										<span class="tip load_page">
										    <a href="#delete" class="delete_pop_box  login-window" title="حذف">
                                                <img src=" {{ asset('images/icon/icon_delete.png ')}}" />
                                            </a>
										</span>

                                        {% include "EnsaoAppBundle:Dossier:deletePaie.html.twig" %}

                                    </td>
                                </tr>

                            {% endfor %}
                            </tbody>
                        </table>

                        <div class="load_page">
                            <ul class="load_page uibutton-group">
                                <li><a href="#addPaie" class="dosPaie_pop_box uibutton icon add" id="ajoutPaie"/>إضافة </a></li>
                            </ul>
                        </div>

                        {% include "EnsaoAppBundle:Dossier:formPaie.html.twig" with {'formPaie': formPaie} %}

                    </div>

                </div>

            </div><!-- End tabs -->
        </div><!-- End demo -->
    </div><!-- End oneTwo -->
</div> <!--End widgets -->


<!-- </div>tab_container-->
</div><!--tab1-->
</div><!-- End UITab -->



{% endblock %}

{% block footer %}
    La fin , opppps bYe bYe !
{% endblock %}
